<%
function loginAuth(){
    var user = "root";
    var pass = "root";
    if (Request.Form("submit") == "Submit"){
        if(Request.Form("user") != user || Request.Form("pass") != pass){
            Response.Write("<script type=\"text/javascript\">alert('Authentication failed, no login system !')</script>");
        }else{
            Response.Cookies("lang") = Request.Form("lang");    //设置Cookies
            var d = new Date(new Date().getTime()+(COOKIE_DAYS*1000)); //设置Cookies保存时间
            Response.Cookies("lang").Expires = d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
            Session("user")=String(Request.Form("user"));   //设置会话
            Response.Redirect("index.asp");
            Response.Write("<script type=\"text/javascript\">window.location.href = \"index.asp\"</script>");
        }
    }
}
%>
